home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Aztec C 5.0a disk 1.adf / include / devices / prtbase.h < prev    next >
C/C++ Source or Header  |  1989-11-05  |  3KB  |  124 lines

  1. #ifndef    DEVICES_PRTBASE_H
  2. #define    DEVICES_PRTBASE_H
  3. #ifndef    EXEC_NODES_H
  4. #include    "exec/nodes.h"
  5. #endif
  6. #ifndef    EXEC_LISTS_H
  7. #include    "exec/lists.h"
  8. #endif
  9. #ifndef    EXEC_PORTS_H
  10. #include    "exec/ports.h"
  11. #endif
  12. #ifndef    EXEC_LIBRARIES_H
  13. #include    "exec/libraries.h"
  14. #endif
  15. #ifndef    EXEC_TASKS_H
  16. #include    "exec/tasks.h"
  17. #endif
  18. #ifndef    DEVICES_PARALLEL_H
  19. #include    "devices/parallel.h"
  20. #endif
  21. #ifndef    DEVICES_SERIAL_H
  22. #include    "devices/serial.h"
  23. #endif
  24. #ifndef    DEVICES_TIMER_H
  25. #include    "devices/timer.h"
  26. #endif
  27. #ifndef    LIBRARIES_DOSEXTENS_I
  28. #include    "libraries/dosextens.h"
  29. #endif
  30. #ifndef    INTUITION_INTUITION_H
  31. #include    "intuition/intuition.h"
  32. #endif
  33. struct    DeviceData    {
  34. struct    Library    dd_Device;
  35. APTR    dd_Segment;
  36. APTR    dd_ExecBase;
  37. APTR    dd_CmdVectors;
  38. APTR    dd_CmdBytes;
  39. UWORD    dd_NumCommands;
  40. };
  41. #define    P_STKSIZE    0x0800L
  42. #define    P_BUFSIZE    256L
  43. #define    P_SAFESIZE    128L
  44. struct    PrinterData    {
  45. struct    DeviceData    pd_Device;
  46. struct    MsgPort    pd_Unit;
  47. BPTR    pd_PrinterSegment;
  48. UWORD    pd_PrinterType;
  49. struct    PrinterSegment    *pd_SegmentData;
  50. UBYTE    *pd_PrintBuf;
  51. int    (*pd_PWrite)();
  52. int    (*pd_PBothReady)();
  53. union    {
  54. struct    IOExtPar    pd_p0;
  55. struct    IOExtSer    pd_s0;
  56. }    pd_ior0;
  57. #define    pd_PIOR0    pd_ior0.pd_p0
  58. #define    pd_SIOR0    pd_ior0.pd_s0
  59. union    {
  60. struct    IOExtPar    pd_p1;
  61. struct    IOExtSer    pd_s1;
  62. }    pd_ior1;
  63. #define    pd_PIOR1    pd_ior1.pd_p1
  64. #define    pd_SIOR1    pd_ior1.pd_s1
  65. struct    timerequest    pd_TIOR;
  66. struct    MsgPort    pd_IORPort;
  67. struct    Task    pd_TC;
  68. UBYTE    pd_Stk[P_STKSIZE];
  69. UBYTE    pd_Flags;
  70. UBYTE    pd_pad;
  71. struct    Preferences    pd_Preferences;
  72. UBYTE    pd_PWaitEnabled;
  73. };
  74. #define    PPCB_GFX    0L
  75. #define    PPCF_GFX    0x1L
  76. #define    PPCB_COLOR    1L
  77. #define    PPCF_COLOR    0x2L
  78. #define    PPC_BWALPHA    0x00L
  79. #define    PPC_BWGFX    0x01L
  80. #define    PPC_COLORALPHA    0x02L
  81. #define    PPC_COLORGFX    0x03L
  82. #define    PCC_BW    0x01L
  83. #define    PCC_YMC    0x02L
  84. #define    PCC_YMC_BW    0x03L
  85. #define    PCC_YMCB    0x04L
  86. #define    PCC_4COLOR    0x04L
  87. #define    PCC_ADDITIVE    0x08L
  88. #define    PCC_WB    0x09L
  89. #define    PCC_BGR    0x0AL
  90. #define    PCC_BGR_WB    0x0BL
  91. #define    PCC_BGRW    0x0CL
  92. #define    PCC_MULTI_PASS    0x10L
  93. struct    PrinterExtendedData    {
  94. char    *ped_PrinterName;
  95. VOID    (*ped_Init)();
  96. VOID    (*ped_Expunge)();
  97. int    (*ped_Open)();
  98. VOID    (*ped_Close)();
  99. UBYTE    ped_PrinterClass;
  100. UBYTE    ped_ColorClass;
  101. UBYTE    ped_MaxColumns;
  102. UBYTE    ped_NumCharSets;
  103. UWORD    ped_NumRows;
  104. ULONG    ped_MaxXDots;
  105. ULONG    ped_MaxYDots;
  106. UWORD    ped_XDotsInch;
  107. UWORD    ped_YDotsInch;
  108. char    ***ped_Commands;
  109. int    (*ped_DoSpecial)();
  110. int    (*ped_Render)();
  111. LONG    ped_TimeoutSecs;
  112. char    **ped_8BitChars;
  113. LONG    ped_PrintMode;
  114. int    (*ped_ConvFunc)();
  115. };
  116. struct    PrinterSegment    {
  117. ULONG    ps_NextSegment;
  118. ULONG    ps_runAlert;
  119. UWORD    ps_Version;
  120. UWORD    ps_Revision;
  121. struct    PrinterExtendedData    ps_PED;
  122. };
  123. #endif
  124.